/*    */ package com.cr.framework.config;
/*    */ 
/*    */ import java.util.Locale;
/*    */ import org.springframework.context.annotation.Bean;
/*    */ import org.springframework.context.annotation.Configuration;
/*    */ import org.springframework.web.servlet.HandlerInterceptor;
/*    */ import org.springframework.web.servlet.LocaleResolver;
/*    */ import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
/*    */ import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
/*    */ import org.springframework.web.servlet.i18n.LocaleChangeInterceptor;
/*    */ import org.springframework.web.servlet.i18n.SessionLocaleResolver;
/*    */ 
/*    */ @Configuration
/*    */ public class I18nConfig implements WebMvcConfigurer {
/*    */   @Bean
/*    */   public LocaleResolver localeResolver() {
/* 23 */     SessionLocaleResolver slr = new SessionLocaleResolver();
/* 25 */     slr.setDefaultLocale(Locale.SIMPLIFIED_CHINESE);
/* 26 */     return (LocaleResolver)slr;
/*    */   }
/*    */   
/*    */   @Bean
/*    */   public LocaleChangeInterceptor localeChangeInterceptor() {
/* 32 */     LocaleChangeInterceptor lci = new LocaleChangeInterceptor();
/* 34 */     lci.setParamName("lang");
/* 35 */     return lci;
/*    */   }
/*    */   
/*    */   public void addInterceptors(InterceptorRegistry registry) {
/* 41 */     registry.addInterceptor((HandlerInterceptor)localeChangeInterceptor());
/*    */   }
/*    */ }


/* Location:              D:\tmp\creditorRights-admin\BOOT-INF\lib\creditorRights-framework-4.7.0.jar!\com\cr\framework\config\I18nConfig.class
 * Java compiler version: 8 (52.0)
 * JD-Core Version:       1.1.3
 */